This invention relates to improvements in motor control strategies, and to motor control and drive circuits incorporating such improved strategies. It especially relates to improvements in motor control strategies for motors in electric power assisted steering systems, although wider applications are envisaged.
Electric motors are becoming increasingly common parts of everyday machines. One area of great interest is the use of an electric motor to apply an assistance torque to a portion of a steering column shaft in order to make the steering wheel of a vehicle easier to turn. By sensing the torque demanded by the driver as the steering wheel is turned, a motor drive signal can be produced which in turn drives a motor connected operatively to the steering column. The motor applies a torque of the same sense as the driver demand to the steering column.
To meet the demands for smooth torque and precise motor drive characteristics, it is known to provide an electric motor comprising a brushless rotor having a number of permanent magnets which rotates within a stator comprising a number (typically three) of phase windings. The phase windings are connected together in a delta or a star arrangement and can be controlled using pulse width modulated signals applied to switching devices in a bridge circuit.
In order to accurately control the motor a measurement of the current flowing in the motor, which enables motor torque to be determined, must be made. It has been proposed that a number of current sensing resistors provided in the motor drive circuit can be employed to take the motor current measurement. A single resistor is provided in series in each phase of the motor, the voltage developed across each resistor being proportional to the current flowing through the resistor. However, this necessitates the need for multiple current sensing circuits, one per resistor.
Alternatively one current sensing resistor could be eliminated since it is known that the algebraic sum of the currents flowing in all phases of the motor must equal zero. Therefore for an n phase motor, (nxe2x88x92ixe2x88x92) current sensing resistors and circuits would be needed.
In an alternative, it has been proposed that only a single sense resistor is used. This configuration reduces cost and component count and is not susceptible to measurement inaccuracies that can occur when two or more sense resistors are used, due to different component and sensing circuit tolerances associated with each current sensor. More accurate motor control can be achieved if measurements are made with precise timing, and offset voltages present in the current measuring circuitry are eliminated. Such a single sense resistor is typically placed in the circuit so as to measure the total instantaneous current flowing between a D.C. power supply and the bridge circuit and motor combination.
In accordance with a first aspect, the invention provides a method of monitoring the operation of a brushless motor comprising a number of phases each comprising one or more windings connected in a bridge circuit, the bridge circuit comprising a number of arms with one arm for each phase, each arm comprising a top switching device connected between the phase and a first supply voltage and a bottom switching device connected between the phase and a second, different, supply voltage, each device being switchable from an on state to an off state the method comprising the steps of: monitoring the current flowing into or out of the bridge circuit and motor using a current measurement means to produce an output signal indicative of the current;
measuring the output of the current measurement means when the instantaneous current flow through the current measurement means is known to be substantially zero;
and producing a modified output signal which is compensated for any differences between the actual measured output signal value and an ideal output signal value.
By switched on we mean that the switching device presents a low impedance to the arm and switched off we mean that it presents a high impedance to the arm.
By monitoring the output of the current measurement means corresponding to the instant when the current in the current measurement means is known to be zero, any offset or drift in the output signal from the current measurement means can be detected and compensated. If required, the output signal can then be reset to zero to produce the modified output value. This can be achieved by generating an offset value substantially equal in magnitude to the actual measured value. This can be added to or subtracted from the actual measured value to force the modified output signal to zero for zero current flow (or some other xe2x80x9cidealxe2x80x9d value) by comparing the actual output to the ideal output. Indeed, the intention is that the compensating value can then be subtracted from any output signal value (even for non-zero currents) to compensate for any zero-offset.
By measuring the output of the current measurement means at instants when the current flowing through the current measurement means is known to be zero whilst the motor is running, the output may be compensated xe2x80x9con-linexe2x80x9d whilst the motor is running. By this, we mean that, if desired, the measurements can be taken whilst the motor is operating in any one of its operating quadrants, i.e. motoring, braking etc. This provides increased flexibility over a system where compensation is made when the motor is switched off. For instance, a more regularly updated compensating value can be obtained without waiting for the motor to be switched off. This is especially useful where the motor forms a part of an electric power steering system, as the zero current measurements can be made periodically or randomly whilst the vehicle is being driven and, for example, the motor is producing torque whether rotating or otherwise.
The method may include a step of adding the offset value to the output signal from the current measurement means, or subtracting the offset value from the output signal value of the current measurement means to produce the modified output signal.
The method is especially suited to monitoring three phase motors although it may be adapted to control motors having more than three phases. The method may further include steps of controlling the motor by applying suitable signals to each switching device to vary the average voltage applied to each phase of the motor whilst also allowing the zero current measurement to be made.
The respective signal applied to each switching device may comprise a pulse width modulated signal. Preferably all the switching devices are modulated by respective pulse width modulated signals that have the same synchronised modulation cycle time.
Preferably, the signals are chosen so that during each or selected pulse width modulation cycles the instantaneous current into or out of the bridge circuit is zero at a first instant independent of the net current in the cycle. This enables a zero measurement to be made when the motor is running, regardless of the overall net motor current.
The preferred pulse width modulated signal applied to each switching device is defined by a single ON-OFF transition and a single OFF-ON transition or edge within each cycle.
The location of the ON-OFF edges within a or each cycle are preferably chosen so that all the top devices are switched on whilst all the bottom devices are switched off at the same time for at least a first instance within each period. This ensures that zero overall current flows into or out of the bridge circuit, and hence through the current measurement means during each period at that first instance. The current measurement means output at this instance can be monitored to produce the actual zero current measurement.
Alternatively, the edge positions are chosen so that at the first instance all the top switching devices are switched off whilst the bottom switching devices are switched on. This also ensures that zero current flows into or out of the bridge circuit, and hence through the current measurement means.
Of course, it is not essential that it is always possible to take a zero current reading during every cycle although this is preferred and does offer the advantage that a regularly updated offset value can be obtained.
The net voltage applied to each phase of the motor during a cycle depends on the duty period of the pulse width modulated signal applied to each switching device. Most preferably, within each cycle the top device is switched on for a period substantially equal to the length of time in which the bottom device is switched off and vice versa, each device being switched from ON to OFF and vice versa only once during each modulation cycle.
Most preferably, during a single cycle the top device is first switched from an initial off state at the start of the period to an on state. It then remains in the on state for a period dependent upon the phase voltage demand. It is then switched back to the off state until the end of the cycle. The entire waveform in one cycle is therefore defined by one on event (or edge) and one off event (or edge).
During the same single cycle, the bottom switching device may be initially in the on state at the start of the cycle. It is then switched to the off state where it remains off for a predetermined time dependent upon the phase demand voltage before being switched back on until the end of the cycle. The entire waveform in one cycle is therefore defined by one off event (or edge) and one on event (or edge).
Most preferably, the method may include the step of aligning the signals for each switching device whereby the on periods of each top switching device and the off periods of the bottom switching device (or vice versa) during each cycle are centre aligned so that the two edges of each signal are spaced equally either side of an arbitrarily chosen point in the cycle. Preferably, they are centred around the centre of the cycle. This ensures that the centre point will correspond to all top switching devices on and all bottom switching devices off, thus defining a suitable point for taking a sample of the output signal from the current measurement means when zero current is flowing through the current measurement means.
In the case of a 3-phase motor, the method may further comprise, after centre aligning the signals, shifting the edges of one or more of the signals within the cycle so that they are overlapped in a manner suitable to enable two precisely timed samples to be taken from the current measurement means, each corresponding to the current in a different single phase of the motor. Knowing that the algebraic sum of the phase currents in a 3-phase motor is zero, measuring the current in 2 phases allows the current in the third phase to be calculated and hence the current in all three phases to be known. Preferably, the signals for the top and bottom switching device in a phase are not shifted relative to each other.
Provided that such shifts allow two phase currents to be measured under all conditions of 3-phase PWM duties, the 3-phase currents can always be measured and hence a closed loop control of the 3-phase currents in the motor can be performed by adjusting the 3 phase PWM duties to control the 3 phase currents to demanded values. Of course, it is important that the duty cycle for each pair of signals is not substantially altered by this shifting, so that the average voltage applied to each phase of the motor remains substantially constant.
Depending on the actual signals in any cycle, it may be possible to align the signal edges so that a sample of zero current can be made when all top switching devices are off and all bottom switching devices are on, as well as a sample when all the top switching devices are on and the bottom switching devices are off. Where possible, the method includes the step of aligning the signal edges in this manner. If it is not possible, one or more error flags may be raised indicating that a zero current sample can not be taken within that cycle.
By way of the present invention, during pulse width modulated control of a motor the various duty cycles can be aligned (where possible) so as to force brief periods in which zero current flows in the current measurement means. The zero current sample can then be taken at these instants. Of course, it is not essential to the invention to take samples of every cycle of the pulse train. Indeed, since priority needs to be given to the non-zero samples needed by the modulation scheme to measure the individual phase currents, such samples may not always be available. However, those skilled in the art will readily appreciate the advantages of being able to compensate for drift in the current measurement circuit whilst the motor is running.
According to a second aspect, the invention provides a method of controlling a motor comprising three phases, each phase being connected to a first voltage through a top switching device and to a second voltage through a bottom switching device, the method comprising the steps of:
calculating a respective phase voltage demand value for each phase of the motor indicative of the net voltage to be applied to the phase;
calculating the duty period value of a pulse width modulated signal for the top switching device and the duty period value of a pulse width modulated signal for the bottom switching device of each phase needed to apply a net voltage to the phase corresponding to the voltage demand value;
processing the duty period value to define for each phase the time delay between a first switching edge for the top switching device where it is switched from an off state to an on state and a second switching edge for the top switching device where it is switched back to the off state and the time delay between a third switching edge for the bottom switching device where it is switched from an on state to an off state and a fourth switching edge for the bottom switching device where it is switched back to the on state, the position of the edges defining a cycle of a PWM signal;
calculating the positions of the edges of the signals for one phase relative to the edges of the signals for the other phases so that at a first instance the current flowing through the current measurement means is indicative of the current in a single phase of the motor and at a second instance the current flowing through the current measurement means is indicative of the current flowing in a second, different, phase; and
modulating each switching device with its respective PWM signal.
Preferably, the edges within a PWM cycle are positioned relative to each other so that at a third instance substantially zero current is flowing through the current measurement means. This may correspond to an instance where all the top switching devices are switched on whilst the bottom switching devices are switched off. Additionally, or alternatively, the edges may be aligned so that at a fourth instance all the top switching devices are switched off whilst the bottom switching devices are switched on. This enables two different zero current conditions to be created in the PWM cycle.
Where possible, the edges are positioned relative to one another so that all four instantaneous conditions set out above are met within a PWM cycle. Obviously, this will depend on the phase voltage demand values as to whether this is possible.
By respectively taking two zero current samples, one when all the top switching devices are switched on and all the bottom switching devices are switched off and the other when the bottom switching devices are switched on, and all the top switching devices are switched off two streams of data corresponding to zero current can be generated. Each stream can be separately filtered and then averaged to allow a compensating value to track changes in the zero output of the current measurement circuit.
It is preferred to use a single pole low-pass recursive filter having a fixed time constant for each stream. The average of the two streams can then be used to calculate the zero current output value.
The method may comprise an intermediate step of initially centre aligning each PWM signal within a PWM cycle so that the first and second edges (or third and forth edges) of the signal are spaced equally about an arbitrarily chosen point in the PWM cycle. This is preferably the centre of the PWM cycle.
The method may comprise the further step of taking at least one current sample during a PWM cycle corresponding to either of the first, second, third or fourth instants.
Most preferably, a sequence of such current samples are taken from within a single PWM cycle, the sequence consisting of one sample from each the first, second, third and fourth instants.
When calculating the time delay between the PWM edges for each signal, one or more interlock delays may be added to the position of each edge. Otherwise, the top switching device is generally switched to be in the on state for a duration substantially equal to the time in which the bottom switching device is in the off state and vice versa.
The three phases are preferably arranged in order of the magnitude of their associated phase voltage demand, the highest being labelled phase A, the lowest phase C.
After initial centre aligning of the edges, the position of the edges can then be shifted so that current measurements can be made. Ideally, the edges are shifted so that at a first instant the top and bottom switching means of one phase are in the opposite state to those of the remaining phases. At a second instant, the top and bottom switching devices of a different phase are in a different state to the top and bottom switching means of the remaining phases. This allows the current flow into or out of the phase having the unique switching state to be measured by measuring the current flowing into or out of the phases.
The edges are preferably shifted in two stages. Firstly, the two signals for phase A may be shifted relative to the signals for phase C, either by shifting the edges for phase A forward (earlier) in the PWM cycle, or the edges for phase C backwards (later) in the PWM cycle or a combination of both until the top switching device of phase A is on whilst the top switching device of phase C is switched off for a minimum overlap time. The edges for phase B may then be shifted either forward or backward in the PWM cycle until a position is reached where both the current flowing into Phase A and the current flowing out of Phase e can be uniquely measured.
It will be clear to those skilled in the art that this produces a first instance in which the current measured will be equal to the current flowing into phase A, and a second instance where the current measured will be equal to the current flowing out of phase C. Of course other shift patterns are envisaged in which the currents at the first and second instants correspond to the current into or out of other phases.
The measured value of current may then be used as the feedback term for a feedback controller designed to control the current in the phases. The current values for A and C are re-allocated to the physical phases in reverse of the ordering procedure previously described.
According to another aspect, the invention provides an electric power steering system incorporating a motor which is monitored using a method according to the first aspect of the invention and/or controlled using a method according to the second aspect.